package org.apache.servicecomb.samples.practise.houserush.customer.manage.api;

import org.apache.servicecomb.samples.practise.houserush.customer.manage.aggregate.Customer;
import org.apache.servicecomb.samples.practise.houserush.customer.manage.aggregate.Qualification;

import java.util.List;

/**
 * @Author: Snake Man
 * @system:
 * @DateTime: 2022/1/19 22:06
 * @Description:
 */
public interface CustomerManageApi {

    //GET 根据id查询客户 customers/{id}
    Customer findCustomer(int id);

    //GET 查询所有客户 customers
    List<Customer> indexCustomers();

    //POST 创建客户 customers
    Customer createCustomer(Customer customer);

    //PUT 根据id修改客户信息 customers/{id}
    Customer updateCustomer(int id, Customer customer);

    //PUT 根据id修改抢房资格 customers/{id}/update_qualifications
    Customer updateCustomerQualifications(int id, List<Qualification> qualifications);

    //DELETE 根据id删除客户 customers/{id}
    void removeCustomer(int id);
}
